
function [ next ] = shipMove( graph,n )
%SHIPMOVE Summary of this function goes here
%   Detailed explanation goes here

next = -1; %staying/not allowed in the moment

%possible = getPossibleNextShipPoints(n); %not needed
random = rand;
p=(sqrt(n^2+4)-n)/2;
%v=1-n*p; %not needed
sum = 0;
for i=1:1:n
   if (sum+p>random)
       next = i + 2;
       break;
   else
       sum = sum + p;
   end
end
if (next < 0)
    next = 2;
end

if (sum(graph)==3)
    %TODO Change Bomb-Position
end

end

